﻿using System.Collections;
using System.Collections.Generic;

public class ThirdPartyInfo : Dictionary<string, string>
{

}

public class PlatformAppInfo
{
    public string package_name_prefix;
    public Dictionary<string, ThirdPartyInfo> third_party_info;
}


public class AppInfo
{
    public string app_name;
    public string package_name_prefix;
    public Dictionary<string, PlatformAppInfo> platform_info;

    public string GetPackageNamePrefix(string platform)
    {
        if(platform_info != null)
        {
            PlatformAppInfo platformInfo = null;
            if(platform_info.TryGetValue(platform, out platformInfo))
            {
                if(!string.IsNullOrEmpty(platformInfo.package_name_prefix))
                {
                    return platformInfo.package_name_prefix;
                }
            }
        }

        return package_name_prefix;
    }

}